<div id="derecha">
	<?php foreach($cursos as $curso){ ?>
	<h1 style="text-align:center">Listado <?php echo $curso['nombre'];?> </h1>
		<table style="width:100%;font-size:18px;empty-cells:show">
			<tr><td>Nombre</td><td>Pag</td><td>Doss</td>
			<?php 
				for($y=0;$y<$curso['ndias'];$y++){?>
				<td colspan="2" style="text-align:center;border:1px #000 solid;">D&iacute;a <?php echo $y+1;?></td>
				<?php
				}
				echo '</tr>';
				foreach($alumnos as $alumno){?>
					<tr>
					<td style="width:46%;border:1px #000 solid;"><p style="margin-left:4px"><?php echo strtolower($alumno['nombre']." ".$alumno['apellidos']);?></p></td>
					<td style="width:4%;border:1px #000 solid;"><?php if($alumno['pagado']>0) echo 'X';?></td>
					<td style="width:4%;border:1px #000 solid;"><?php if($alumno['dossier']>0)echo 'X';?></td>
					<?php
					$dias=$curso['ndias']*2;
					$espacio=($dias/50)*100;
					for($x=1;$x<=$curso['ndias'];$x++){
						for($z=1;$z<=2;$z++){
							$acudio = "dia".$x.$z;
							if(!$alumno[$acudio]){
							?>
								<td style="width:<?php echo $espacio; ?>;border:1px #000 solid;"></td>
							<?php
							}
							else{
								?>
								<td style="width:<?php echo $espacio; ?>;border:1px #000 solid;">X</td>
							<?php
							}
						}
					}
				}
				echo '</tr>';
				echo '</table>';
				?>
	<!--<a href="javascript:window.print()" id="imprime"><img style="margin-left:300px" src="imagenes/impresora.png"></a>-->
	<script type="text/javascript">
		print();
	</script>
	<?php } ?>
</div>